import { AudioClip, BufferAsset, Component, JsonAsset, Prefab, SpriteFrame, Texture2D, _decorator } from "cc";

const { ccclass, property } = _decorator;


/** 
  周无邪出品
  本源码用于学习研究使用。
  作者联系方式：tuya7078（微信）。
 */
@ccclass('LoadPkg')
export class LoadPkg extends Component {
    public static Instance: LoadPkg = null as unknown as LoadPkg
    onLoad() {
        if (LoadPkg.Instance === null) {
            LoadPkg.Instance = this;
        }
        else {

            this.destroy();
            return;
        }
    }
    //资源包
    public pkg = {
        //启动加载
        bootData: {
            "GUI": [
                {
                    assetType: Prefab,
                    urls: [
                        "UILoading",
                        "showTip",
                        "showLoading",
                      

                    ],
                },


            ],

            "Sounds": [
                {
                    assetType: AudioClip,
                    urls: [
                        "click",
                        "loose",//弓箭
                        "tornado",//龙卷风
                        "invincible",//无敌
                        "fire",
                        "fireBall",
                        "fireBallBig",
                        "bgm1",
                        "bgm2",
                        "levelUp",
                        "fail",
                        "win",
                        "recovery",//升级
                        "revive",//复活
                        "sell",//获得金币
                        
                 
                    ]
                }
            ]
        },
        //菜单页面
        enterGamePkg: {

            "GUI": [
                {
                    assetType: Prefab,
                    urls: [
                        "UIhome",
                        "shop_player",
                        "shop_friendly",
                        "shop_build",
                        "set",
                        "item/shopItem",
                        "item/buildItem",
                        "item/friendlyItem",

                         "qiandao",
                         "choujiang"







                    ],
                },

                {
          

                    assetType: SpriteFrame,
                    urls: [
                        "enemyImg/altman",
                        "enemyImg/axe",
                        "enemyImg/javelin",
                        "enemyImg/clown",
                        "enemyImg/soldier",
                        "enemyImg/catapult",


                        "skillIcon/arrow_count",

                        "skillIcon/baoji",

                        "skillIcon/baojiADD",

                        "skillIcon/fangyu",
                        "skillIcon/gongji",
                        "skillIcon/hudunCD",
                        "skillIcon/jiansu",
                        "skillIcon/jiguangAtaack",
                        "skillIcon/jisu",
                        "skillIcon/minjie",
                        "skillIcon/sanlianjiCd",
                        "skillIcon/shecheng",
                        "skillIcon/shengming",
                        "skillIcon/tornado_attack",
                        "skillIcon/tornado_Range",
                        "skillIcon/tornado_scale",
                        "skillIcon/tornado_time",









                        "buiidIcon/hp",
                        "buiidIcon/friendly",
                        "buiidIcon/cannonRange",
                        "buiidIcon/cannonAttack",



                    ]
                },
            ],
            "prefab": [
                {
                    assetType: Prefab,
                    urls: [
                        "effect/levelUp",
                        "effect/recovery",
                        "effect/revival",
                        "effect/runSmoke",


                    ],
                },


            ],



        
        },

        //开始游戏
        startGamePkg: {


            "GUI": [
                {
                    assetType: Prefab,
                    urls: [
                        "UIstart",
                        "fight/monsterBloodBar",
                        "fight/playerBloodBar",
                        "fight/towerBloodBar",
                        "SkillChoiceUI",
                        "fight/fightTip",
                        "GameWin",
                        "GameOver"


                    ],
                },


            ],

            "enemy": [
                {
                    assetType: Prefab,
                    urls: [
               


                    ],
                },


            ],

            "prefab": [
                {
                    assetType: Prefab,
                    urls: [
           


                    ],
                },


            ],
            //废弃
            "navMap": [
                {
                    assetType: JsonAsset,
                    urls: [
                 

                    ],
                },


         ],
    

        },
    }



}